import Vue from 'vue'
import VueRouter from 'vue-router'
import AHome from '@/components/AHome.vue'
import Login from '@/components/MyProfile/Login.vue'
import Order from '@/components/CustomerOrders/Order.vue'
import OrderDetail from '@/components/CustomerOrders/OrderDetail.vue'
import UpdateOrderDetail from '@/components/CustomerOrders/UpdateOrderDetail.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: AHome,
    children: [
      {
        path: '/khdd',
        component: Order
      },
      {
        path: '/orderDetail',
        component: OrderDetail
      },
      {
        path: '/updateOrderDetail',
        component: UpdateOrderDetail
      },
    ]
  },
  {
    path: '/login',
    component: Login
  }
]

const router = new VueRouter({
  routes
})

export default router
